package com.liwei.app;

import com.liwei.services.IA;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.Scanner;

public class MyApp3 {
    public static void main(String[] args) {
        String className="";
        Scanner scanner=new Scanner(System.in);
        className=scanner.next();
        IA ia=null;
        try {
            Class aClass = Class.forName(className);
            Constructor declaredConstructor = aClass.getDeclaredConstructor();
            declaredConstructor.setAccessible(true);
            ia= (IA) declaredConstructor.newInstance();
            ia.js(100,200);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (InvocationTargetException e) {
            e.printStackTrace();
        } catch (NoSuchMethodException e) {
            e.printStackTrace();
        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }

        /*IA ia=null;
        String className=args[0];
        try {
            Class aClass = Class.forName(className);
            Constructor declaredConstructor = aClass.getDeclaredConstructor();
            declaredConstructor.setAccessible(true);
            ia= (IA) declaredConstructor.newInstance();
            ia.js(100,200);
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (InvocationTargetException e) {
            e.printStackTrace();
        } catch (NoSuchMethodException e) {
            e.printStackTrace();
        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        }*/
    }
}
